<?php use_helper('Pagination'); ?>

<?php include_partial('back/show', array('uri' => '@localized_homepage')); ?>
<h1 class="title">Actualités de CPF Aizenay</h1>

<ul id="seeOtherNews" class="other-news">
<?php foreach($news_list as $news){ ?>
    <?php $imagesAttributes = Utils::getImageSize($news['sfAsset'][ 'Folder' ][ 'relative_path' ], $news['sfAsset'], 63, 36 ); ?>
    <li>
        <h3>
            <a href=<?php echo url_for(array('module' => 'news', 'action' => 'index', 'year' => date("Y", strtotime($news['updated_at'])), 'month' => date("m", strtotime($news['updated_at'])), 'title_slug' => $news['slug'])) ?>>
                <?php echo truncate_text($news['title'], 30, '...') ?>
            </a>
        </h3>
        <span>Posté le <?php echo date("d/m/Y", strtotime($news['updated_at'])) . '<br/>par ' . $news['sfGuardUser01']['username'] . '<span class="nb-com">' . $news['nb_comments'] ?></span></span>
        <div class="thumb">
            <img title="<?php echo $news['title'] ?>" alt="<?php echo $news['title'] ?>" src="<?php echo $imagesAttributes['small']['url'] ?>" width="<?php echo $imagesAttributes['small']['width'] ?>" height="<?php echo $imagesAttributes['small']['height'] ?>"/>
        </div>
     </li>
<?php }?>
</ul>
<div class="push_float_left"></div>
<div class="navPages"><?php echo pager_navigation($news_list, url_for('@news_all')); ?></div>
<div class="push_float"></div>